#ifndef RUMDFILE_H
#define RUMDFILE_H
/******************************************************************************
*UMD stands for Universal Mobile Document, one of the ebook format that widely
*used in mobile.
*This class repensent the UMD file format.
*UMD file is consisted of following format:
*1. Header
* [0~3] 0xde9a9b89
* [4] #(0x23)
* [5~8] 0x01,0x00,0x00,0x08
* [9] 0x01(text)/0x02(cartoon)
* [10~11] random number
*
*2.Basic property definition, may have multiple properties
*  [0] #(0x23)
*  [1] Property type:
       0x01--Start of file
       0x02--Title
       0x03--Author
       0x04--Year
       0x05--Month
       0x06--Day
       0x07--Novel Type
       0x08--Publisher
       0x09--Retailer
       0x0b--Content Length
       0x83--Chapter Offset
       0x84--ChapterTitle, content
       0x81--Content end
       0x82--Cover
       0x87--PageOffset
       0x0c--End of File
*  [2] 0x00
*  [3] property_length*2+5
*  [4~property_length+4] property
*3. Content Length
*  [0] #(0x23)
*  [1~2] 0x0b 0x00
*  [3~4] 0X00 0X09
*  [5~8] content_length
*4. Chapter offset
*  [0] #(0x23)
*  [1~2] 0x83 0x00
*  [3~4] 0X01 0X09
*  [5~8] random number 2
*  [9] 0x24
*  [10~13] random number 3(same value as random number 2)
*  [14~17] chapter_num*4 + 9
*  [18~17+chapter_num*4] every 4 bytes stands for the chapter offset
*5. Chapter Title
*  [0] #(0x23)
*  [1~2] 0x84 0x00
*  [3~4] 0X01 0X09
*  [5~8] random number 4
*  [9] 0x24
*  [10~13] random number 5(same value as random number 4)
*  [14~17] (chapter_1_title_length*2+1)+(chapter_2_title_length*2+1) + ... + 9
*  [18] chapter_1_title_length*2
*  [19~chapter_1_title_length*2+18] chapter_1_title
*  ...
*6. Content block which is compressed with zlib
*  [0] 0x24
*  [1~4] random number 6
*  [5~8] block_len+9
*  [9~8+block_len] block_content
*  [9+block_len] #
*  option1: 0xf1 0x00 0x00 0x15 0x00(16 bytes)
*  option2: 0x0a 0x00 0x00 0x09 random_number(4 bytes)
*7. Content end
*  [0] #
*  [1~2] 0x81 0x00
*  [3~6] random_number 7
*  [7] 0x24
*  [8~11] random_number 8 (same as random_number 7)
*  [12~14] block_number*4+9
*  [4bytes] block_n_random_number
*  [4bytes] block_n-1_random_number
*  ...
*8. Cover
*  [0] #
*  [1~2] 0x82 0x00
*  [3~6] random_number 9
*  [7] 0x24
*  [8~11] random_number 10 (same as random_number 9)
*  [12~14] cover_len+9
*  [cover_len] cover

******************************************************************************/


#include <QObject>

class RUmdFile : public QObject
{
    Q_OBJECT
public:
    explicit RUmdFile(QObject *parent = 0);

signals:

public slots:

private:


};

#endif // RUMDFILE_H
